Optimal. Leaf size=92 \[ \frac{(A b-a C) \log \left (a+b x^2\right )}{2 b^2}+\frac{x (b B-a D)}{b^2}-\frac{\sqrt{a} (b B-a D) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0846149, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {1802, 635, 205, 260} \[ \frac{(A b-a C) \log \left (a+b x^2\right )}{2 b^2}+\frac{x (b B-a D)}{b^2}-\frac{\sqrt{a} (b B-a D) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1802
Rule 635
Rule 205
Rule 260
Rubi steps
\begin{align*} \int \frac{x \left (A+B x+C x^2+D x^3\right )}{a+b x^2} \, dx &=\int \left (\frac{b B-a D}{b^2}+\frac{C x}{b}+\frac{D x^2}{b}-\frac{a (b B-a D)-b (A b-a C) x}{b^2 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac{(b B-a D) x}{b^2}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b}-\frac{\int \frac{a (b B-a D)-b (A b-a C) x}{a+b x^2} \, dx}{b^2}\\ &=\frac{(b B-a D) x}{b^2}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b}+\frac{(A b-a C) \int \frac{x}{a+b x^2} \, dx}{b}-\frac{(a (b B-a D)) \int \frac{1}{a+b x^2} \, dx}{b^2}\\ &=\frac{(b B-a D) x}{b^2}+\frac{C x^2}{2 b}+\frac{D x^3}{3 b}-\frac{\sqrt{a} (b B-a D) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{(A b-a C) \log \left (a+b x^2\right )}{2 b^2}\\ \end{align*}
Mathematica [A] time = 0.0637263, size = 81, normalized size = 0.88 \[ \frac{3 (A b-a C) \log \left (a+b x^2\right )+x (-6 a D+6 b B+b x (3 C+2 D x))}{6 b^2}+\frac{\sqrt{a} (a D-b B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 106, normalized size = 1.2 \begin{align*}{\frac{D{x}^{3}}{3\,b}}+{\frac{C{x}^{2}}{2\,b}}+{\frac{Bx}{b}}-{\frac{aDx}{{b}^{2}}}+{\frac{\ln \left ( b{x}^{2}+a \right ) A}{2\,b}}-{\frac{\ln \left ( b{x}^{2}+a \right ) aC}{2\,{b}^{2}}}-{\frac{Ba}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}D}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.968387, size = 211, normalized size = 2.29 \begin{align*} \frac{C x^{2}}{2 b} + \frac{D x^{3}}{3 b} + \left (- \frac{- A b + C a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right ) \log{\left (x + \frac{- A b + C a + 2 b^{2} \left (- \frac{- A b + C a}{2 b^{2}} - \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right )}{- B b + D a} \right )} + \left (- \frac{- A b + C a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right ) \log{\left (x + \frac{- A b + C a + 2 b^{2} \left (- \frac{- A b + C a}{2 b^{2}} + \frac{\sqrt{- a b^{5}} \left (- B b + D a\right )}{2 b^{5}}\right )}{- B b + D a} \right )} - \frac{x \left (- B b + D a\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18793, size = 119, normalized size = 1.29 \begin{align*} -\frac{{\left (C a - A b\right )} \log \left (b x^{2} + a\right )}{2 \, b^{2}} + \frac{{\left (D a^{2} - B a b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{2 \, D b^{2} x^{3} + 3 \, C b^{2} x^{2} - 6 \, D a b x + 6 \, B b^{2} x}{6 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]